<?php

class MessageControl extends Control {

	private $multi_message;
	public function __construct(){
		$a = func_get_args();
		$this->multi_message = new MultiMessage($a);
	}

	public function Render(){

		echo '<table width="100%" cellspacing="5" cellpadding="0" border="0" style="background:'.$this->multi_message->GetBackgroundColor().';border:1px solid '.$this->multi_message->GetBorderColor().';">';
		foreach ($this->multi_message as $m){
			echo '<tr>';
			echo '<td valign="top" style="padding:0;border:0;background:'.$this->multi_message->GetBackgroundColor().';">'.$m->GetIcon16().'</td>';
			echo '<td  class="expand" style="padding:0;border:0;background:'.$this->multi_message->GetBackgroundColor().';">'.$m->AsString().'</td>';
			echo '</tr>';
		}
		echo '</table>';
	}
}

?>
